/**
 * eCommerce Application Sample for J2EE Training
 * Local interface definition for the Cart bean
 * EJB3.0
 * @author Fabienne Boyer - Didier Donsez - may 2006
 */
package ecom.cart;

import ecom.entity.Product;
import java.util.List;


public interface CartLocal {
    
//    List<CartItem> getItems();
//    int getNumberOfItems();
//    double getSubtotal();
//    double getTotal();
//
//    void addItem(Product product, double price, int storeId);
//    void update(Product product, String storeId, String quantity);
//    void calculateTotal(String surcharge);
//    void clear();
    
    
    int createCart(Cart cart);
    Cart getCart(Integer cartId);
    List<CartItem> getItems(Integer cartId);
    int getNumberOfItems(Integer cartId);
    double getSubtotal(Integer cartId);
    double getTotal(Integer cartId);
    
    void addItem(Integer cartId, Product product, double price, int storeId);
    void update(Integer cartId, Product product, String storeId, String quantity);
    void calculateTotal(Integer cartId, String surcharge);
    void clear(Integer cartId);
}
